10. The displayMessage Method
The displayMessage Method
Question:
Start Quiz:
Solution:
INSTRUCTOR NOTE:
The end goal should look something like this:
In the activity_main.xml
layout:
- Change PRICE label to ORDER SUMMARY
- Change the TextView for price value to have an ID of
@+id/order_summary_text_view.
In MainActivity.java
, in the displayMessage(String message)
method:
- Change variable name from
priceTextView
toorderSummaryTextView
. - Change
R.id.price_text_view
toR.id.order_summary_text_view
.
In MainActivity.java
:
- Remember to delete the
displayPrice()
method because we don’t need that anymore.